//
//  Toolkit.h
//  jizhiyunduan
//
//  Created by 鞠超 on 16/4/13.
//  Copyright © 2016年 JC. All rights reserved.
//


#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <MobileCoreServices/MobileCoreServices.h>

@interface Toolkit : NSObject

#pragma mark - 检测设备版本
+ (BOOL )isSystemIOS7;

+ (BOOL )isSystemIOS8;

+ (BOOL )isSystemIOS9;

#pragma mark - 文本数据转换为base64格式字符串
+ (NSString *)base64EncodedStringFrom:(NSData *)data;

#pragma mark -  根据字符串的长度和视图的宽度计算所需高度
+(CGFloat )heightWithString:(NSString*)string fontSize:(CGFloat)fontSize width:(CGFloat)width;

#pragma mark - 根据16进制色值转换成可以直接使用的颜色
+(UIColor *)colorWithHexString:(NSString *)stringToConvert;

#pragma mark - 返回rgba色值
+(NSMutableArray *)getColorRGBA:(UIColor *) color;

#pragma mark - 判断字符串是不是空,防止崩溃 ***
+(BOOL )stringIsNull:(NSString *)str;

#pragma mark - 显示/取消 顶部菊花
+(UIActivityIndicatorView *)showJuHua;

+(UIActivityIndicatorView *)hideJuHua;



#pragma mark - camera
+ (BOOL )isCameraAvailable;
+ (BOOL )isRearCameraAvailable;
+ (BOOL )isFrontCameraAvailable;
+ (BOOL )doesCameraSupportTakingPhotos;
+ (BOOL )isPhotoLibraryAvailable;
+ (BOOL )canUserPickVideosFromPhotoLibrary;
+ (BOOL )canUserPickPhotosFromPhotoLibrary;
+ (BOOL )cameraSupportsMedia:(NSString *)paramMediaType sourceType:(UIImagePickerControllerSourceType)paramSourceType;

@end
